package day12;

/**
 * @author oldliu
 * @since 1.0
 */
public class Hotel {
    private String name,addr,tele;
    public License license;

    public Hotel(){

    }
    public Hotel(String name,String addr){
        this.name=name;
        this.addr=addr;
        license=new License("包河区工商局","老吴","住宿，坦克维修，原子弹制造，生猪加工","2020-1-1-----2025-12-1");
    }
    public class License{
        String from,to,fanwei;
        String riqi;

        public License(String from, String to, String fanwei, String riqi) {
            this.from = from;
            this.to = to;
            this.fanwei = fanwei;
            this.riqi = riqi;
        }
        public void show(){
            System.out.println("印业执照信息如右：颁发机构 "+from+",发给了"+to+",经营范围是"+fanwei+",有效期限是"+riqi);
            System.out.println("发给了"+name+",经营者的信息如下：");
            //外部类的名+this
            Hotel.this.show();//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
            //show();
        }
    }
    public void show(){
        System.out.println("这家宾馆位于"+this.addr+".名叫"+name+",电话号码是"+this.tele);
        System.out.println(license.fanwei);
    }
}